<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{page_title}</title>
<link type="text/css" rel="stylesheet"
	href="<?php echo $this->load->config->item('base_url') . $this->load->config->item('inc_folder');?>styles/layout.css" />
<link type="text/css" rel="stylesheet"
	href="<?php echo $this->load->config->item('base_url') . $this->load->config->item('inc_folder');?>styles/jquery.sidr.light.css" />
<link type="text/css" rel="stylesheet"
	href="<?php echo $this->load->config->item('base_url') . $this->load->config->item('inc_folder');?>styles/jquery.ui.all.css" />
<link type="text/css" rel="stylesheet"
	href="<?php echo $this->load->config->item('base_url') . $this->load->config->item('inc_folder');?>styles/jquery.ui.datepicker.css" />
<link type="text/css" rel="stylesheet"
	href="<?php echo $this->load->config->item('base_url') . $this->load->config->item('inc_folder');?>styles/jPages.css" />
</head>
<body>
<div id="container">
<div id="left-menu"><a id="left-menu" href="#left-menu">Menu</a></div>
<div class="header">
	<marquee>Welcome,<?php if(isset($this->session->userdata['userid'])){ ?>&nbsp;{name}<?php } ?></marquee>
</div>
<div id="content">
<div class="right_content"><?php echo $content;?></div>
</div>
<div id="cssmenu" style="visibility:hidden;"><?php include("menutemplate.php")?></div>
<div class="footer">
<p class="footer">Page rendered in <strong>{elapsed_time}</strong>
seconds</p>
</div>
</div>
</body>
<script language="javascript" type="text/javascript"
	src="<?php echo $this->load->config->item('base_url') . $this->load->config->item('inc_folder'); ?>scripts/jquery-2.0.3.js"></script>
<script language="javascript" type="text/javascript"
	src="<?php echo $this->load->config->item('base_url') . $this->load->config->item('inc_folder'); ?>scripts/jquery.js"></script>
<script language="javascript" type="text/javascript"
	src="<?php echo $this->load->config->item('base_url') . $this->load->config->item('inc_folder'); ?>scripts/jPages.js"></script>
<script language="javascript" type="text/javascript"
	src="<?php echo $this->load->config->item('base_url') . $this->load->config->item('inc_folder'); ?>scripts/jquery.sidr.min.js"></script>
<script language="javascript" type="text/javascript"
	src="<?php echo $this->load->config->item('base_url') . $this->load->config->item('inc_folder'); ?>scripts/jquery.ui.core.js"></script>
<script language="javascript" type="text/javascript"
	src="<?php echo $this->load->config->item('base_url') . $this->load->config->item('inc_folder'); ?>scripts/menu_jquery.js"></script>
<script language="javascript" type="text/javascript"
	src="<?php echo $this->load->config->item('base_url') . $this->load->config->item('inc_folder'); ?>scripts/jquery.ui.datepicker.js"></script>

<script language="javascript" type="text/javascript">
	$(document).ready(function(){
		$('#left-menu').sidr({
			name: 'sidr-left',
			source: '#cssmenu'			
		});
		<?php if(isset($masterbarang)){ if(count($masterbarang) > 0){?>
		var $i = 1;
		$('#btnAddingDiv').click(function(){
			$i++;
			var html = "<div id=\"div_"+ $i +"\"><input type=\"button\" onclick=\"javascript:$('#div_"+ $i +"').remove();\" value=\"Delete Me\"/><table width=\"100%\" cellpadding=\"3\" cellspacing=\"0\" border=\"1\"><tr><td width=\"131\">Nama Barang</td><td width=\"23\">:</td><td width=\"760\" ><select name=\"kdbarang[]\"><?php $count = count($masterbarang);foreach($masterbarang as $comboInd){?><option value=\"<?php echo $comboInd->KodeDetailBarang?>\"><?php echo $comboInd->Productname;?></option><?php }?></select></td></tr><tr><td width=\"131\">Harga Barang</td><td width=\"23\">:</td><td ><input type=\"text\" name=\"hrgbarang[]\" id=\"hrgbarang[]\" size=\"50\" maxlength=\"11\" onkeyup=\"javascript:setAmount(this);\"/></td></tr><tr><td width=\"131\">Quantity</td><td width=\"23\">:</td><td ><input type=\"text\" name=\"qty[]\" id=\"qty[]\" size=\"50\" maxlength=\"4\" onkeyup=\"javascript:setQty(this);\"/></td></tr><tr><td width=\"131\">Discount</td><td width=\"23\">:</td><td ><input type=\"text\"  name=\"distcoun[]\" id=\"distcoun[]\" size=\"50\" maxlength=\"4\"/></td></tr><tr><td width=\"131\">Jumlah Harga</td><td width=\"23\">:</td><td ><input type=\"text\"  name=\"jmlhhrg[]\" id=\"jmlhhrg[]\" size=\"15\" maxlength=\"11\" class=\"flat-textbox\" onmousedown=\"javascript:hitungTotal(this,"+ $i +");\"/></td></tr></table></div><br/>";
			$('#divrows').append(html);
		});
		<?php }}?>
		<?php if(isset($array_stock)) { if(count($array_stock) > 0){?>
		$("div #stock.holder").jPages({
		      containerID : "datastock",
		      previous : "Prev",
		      next : "Next",
		      perPage : 25,
		      delay : 20
		 });
		 <?php }}?>
		 <?php if(isset($users)) { if(count($users) > 0){?>		 
		 $("div #user.holder").jPages({
		      containerID : "datauser",
		      previous : "Prev",
		      next : "Next",
		      perPage : 25,
		      animation:false,
		      delay : 1,
		      fallback:1
		 });
		 $('#btnSimpanUser').click(function(){	
			$.post(
					'<?php echo site_url('usermanagecontroller/index')?>',
					function(result){
						alert('data berhasil');
					}
			);
		 });
		 <?php }}?>
		 
		 <?php if(isset($transdelay)) { if(count($transdelay) > 0){?>		 
		 $("div #transdelay.holder").jPages({
		      containerID : "datadelay",
		      previous : "Prev",
		      next : "Next",
		      perPage : 10,
		      delay : 20
		 });
		 <?php }}?>
		 
		 <?php if(isset($det_barang)) { if(count($det_barang) > 0){?>		 
		 $("div #det_barang.holder").jPages({
		      containerID : "databayarbeli",
		      previous : "Prev",
		      next : "Next",
		      perPage : 10,
		      delay : 20
		 });
		 <?php }}?>
		 
	});	
    </script>
<!--<script language="javascript" type="text/javascript" src="<?php echo $this->load->config->item('base_url') . $this->load->config->item('inc_folder'); ?>scripts/menu_jquery.js"></script>-->
</html>
